package com.wyzz.hr.pojo.base;

import java.io.Serializable;
import java.util.Date;

import com.wyzz.hr.pojo.Emphistposition;
import com.wyzz.hr.pojo.Employee;
import com.wyzz.hr.pojo.Position;

public abstract class BaseEmphistposition implements Serializable {

	public BaseEmphistposition() {
		hashCode = 0x80000000;
		initialize();
	}

	public BaseEmphistposition(String id) {
		hashCode = 0x80000000;
		setId(id);
		initialize();
	}

	public BaseEmphistposition(String id, Employee ehposEmpNo,
			Position ehposPositionNo, Date ehposValidFrom, Integer ehposIsLatest) {
		hashCode = 0x80000000;
		setId(id);
		setEhposEmpNo(ehposEmpNo);
		setEhposPositionNo(ehposPositionNo);
		setEhposValidFrom(ehposValidFrom);
		setEhposIsLatest(ehposIsLatest);
		initialize();
	}

	protected void initialize() {
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
		hashCode = 0x80000000;
	}

	public Date getEhposValidFrom() {
		return ehposValidFrom;
	}

	public void setEhposValidFrom(Date ehposValidFrom) {
		this.ehposValidFrom = ehposValidFrom;
	}

	public Date getEhposValidTo() {
		return ehposValidTo;
	}

	public void setEhposValidTo(Date ehposValidTo) {
		this.ehposValidTo = ehposValidTo;
	}

	public Integer getEhposIsLatest() {
		return ehposIsLatest;
	}

	public void setEhposIsLatest(Integer ehposIsLatest) {
		this.ehposIsLatest = ehposIsLatest;
	}

	public Employee getEhposEmpNo() {
		return ehposEmpNo;
	}

	public void setEhposEmpNo(Employee ehposEmpNo) {
		this.ehposEmpNo = ehposEmpNo;
	}

	public Position getEhposPositionNo() {
		return ehposPositionNo;
	}

	public void setEhposPositionNo(Position ehposPositionNo) {
		this.ehposPositionNo = ehposPositionNo;
	}

	public boolean equals(Object obj) {
		if (null == obj)
			return false;
		if (!(obj instanceof Emphistposition))
			return false;
		Emphistposition emphistposition = (Emphistposition) obj;
		if (null == getId() || null == emphistposition.getId())
			return false;
		else
			return getId().equals(emphistposition.getId());
	}

	public int hashCode() {
		if (0x80000000 == hashCode) {
			if (null == getId())
				return super.hashCode();
			String hashStr = (new StringBuilder()).append(getClass().getName())
					.append(":").append(getId().hashCode()).toString();
			hashCode = hashStr.hashCode();
		}
		return hashCode;
	}

	public String toString() {
		return super.toString();
	}

	public static String REF = "Emphistposition";
	public static String PROP_EHPOS_VALID_TO = "ehposValidTo";
	public static String PROP_EHPOS_VALID_FROM = "ehposValidFrom";
	public static String PROP_EHPOS_POSITION_NO = "ehposPositionNo";
	public static String PROP_EHPOS_IS_LATEST = "ehposIsLatest";
	public static String PROP_EHPOS_EMP_NO = "ehposEmpNo";
	public static String PROP_ID = "id";
	private int hashCode;
	private String id;
	private Date ehposValidFrom;
	private Date ehposValidTo;
	private Integer ehposIsLatest;
	private Employee ehposEmpNo;
	private Position ehposPositionNo;

}
